<!DOCTYPE html>
<html>
<head> 
<meta charset="utf-8"> 
<title>JavaScript 条件语句</title> 
</head>
<body>

<p id="demo"></p>
<script>
var r=Math.random();
var x=document.getElementById("demo")
if (r>0.5){
	x.innerHTML="<a href='index.html'>主页</a>";
}
else{
	x.innerHTML="<a href='introduce.html'>简介</a>";
}
</script>

</body>
</html>